package com.ruoyi.market.service.impl;

import com.ruoyi.market.domain.ConfigEmployee;
import com.ruoyi.market.mapper.ConfigEmployeeMapper;
import com.ruoyi.market.service.IConfigEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 店铺店员配置 业务层处理
 * 
 * @author ruoyi
 */
@Service
public class ConfigEmployeeServiceImpl implements IConfigEmployeeService
{

    @Autowired
    private ConfigEmployeeMapper configEmployeeMapper;

    /**
     * 根据条件分页查询店铺店员配置列表
     * 
     * @param configEmployee 店铺店员配置信息
     * @return 店铺店员配置信息集合信息
     */
    @Override
    public List<ConfigEmployee> selectConfigEmployeeList(ConfigEmployee configEmployee)
    {
        return configEmployeeMapper.selectConfigEmployeeList(configEmployee);
    }

    /**
     * 通过店铺店员配置ID查询店铺店员配置
     * 
     * @param shopId 店铺ID
     * @return 店铺店员配置对象信息
     */
    @Override
    public ConfigEmployee selectConfigEmployeeByShopId(String shopId)
    {
        return configEmployeeMapper.selectConfigEmployeeByShopId(shopId);
    }

    /**
     * 新增保存店铺店员配置信息
     * 
     * @param configEmployee 店铺店员配置信息
     * @return 结果
     */
    @Override
    @Transactional
    public int insertConfigEmployee(ConfigEmployee configEmployee)
    {
        // 新增店铺店员配置信息
        int rows = configEmployeeMapper.insertConfigEmployee(configEmployee);
        return rows;
    }

    /**
     * 修改保存店铺店员配置信息
     * 
     * @param configEmployee 店铺店员配置信息
     * @return 结果
     */
    @Override
    @Transactional
    public int updateConfigEmployee(ConfigEmployee configEmployee)
    {
        return configEmployeeMapper.updateConfigEmployee(configEmployee);
    }

    /**
     * 批量删除店铺店员配置信息
     * 
     * @param configEmployeeIds 需要删除的店铺店员配置ID
     * @return 结果
     */
    @Override
    @Transactional
    public int deleteConfigEmployeeByIds(Long[] configEmployeeIds) { return configEmployeeMapper.deleteConfigEmployeeByIds(configEmployeeIds); }
}
